From 79ff1b669c74ecb3d876d4616a9fc4fad640f521 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Tue, 6 Sep 2011 19:22:59 +0200 Subject: [PATCH] x11: Don't create GdkDevices for disabled devices Fixes bug #658379 - Disabled devices still added to list on startup, spotted by Bastien Nocera. Do not create GdkDevices for disabled devices on device manager construction, leading to a confusing initial state. --- gdk/x11/gdkdevicemanager-xi2.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gdk/x11/gdkdevicemanager-xi2.c b/gdk/x11/gdkdevicemanager-xi2.c index 425efeeab9..c921ce0075 100644 --- a/gdk/x11/gdkdevicemanager-xi2.c +++ b/gdk/x11/gdkdevicemanager-xi2.c @@ -417,6 +417,10 @@ gdk_x11_device_manager_xi2_constructed (GObject *object) for (i = 0; i < ndevices; i++) { dev = &info[i]; + + if (!dev->enabled) + continue; + add_device (device_manager, dev, FALSE); if (dev->use == XIMasterPointer || -- 2.30.2